package servidor;

import interfaz.InterfazRemota;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;

import remoto.CasaCentral;


public class Server {
public static void main(String[] args) {
		
		new Server();
		

	}
	
	public Server(){
		inicializar();
	}
	
	public void inicializar(){
		try{
			InterfazRemota or=new CasaCentral();
			LocateRegistry.createRegistry(1099);
			Naming.rebind("//127.0.0.1/Central", or);
			
		}
		catch(RemoteException e){
			e.printStackTrace();
		} 
		
		catch (MalformedURLException e){
			e.printStackTrace();
		}
	}
}

